<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/laypage.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/vue/vue.min.js"></script>
    <script src="/js/layer/layer.js"></script>
    <script src="/js/laypage/laypage.js"></script>
    <style>
        .main{
            width: 1400px;
            height: 1000px;
            background-color: white;
            margin: 30px auto 0px auto;
        }
        .main_one{
            width:100%;
            height:100%;
            padding: 50px 0px;
        }
        .left{
            width: 200px;
            height: 100%;
            border-right: 1px solid #E2E2E2;
            float: left;
        }
        .left li{
            height: 50px;
            text-align: center;
            line-height: 50px;
            font-size: 18px;
        }
        .right{
            margin-left: 25px;
            float: left;
        }
        .right .me_one li{
            margin-bottom: 17px;
        }
        .myExam{
            float: left;
        }
        .sim{
            float: left;
            display: none;
        }
        .his{
            float: left;
            display: none;
        }
        /*清除浮动*/
        .clearfix:after {
            content: "";
            display:block;
            height:0;
            clear:both;
            visibility:hidden;
        }
        .sim{
            font-size: 16px;
        }
        .dyj li{
            float: left;
            width: auto;
            height: 32px;
            line-height: 32px;
            margin-left: 20px;
            padding: 1px 6px;

        }
        .dyj>div{
            padding: 10px;
        }
        .mouseLi{
            background-color: #30A4FF;
            color: white;
        }
        .clickLi{
            background-color: #30A4FF;
            color: white;
        }
    </style>
</head>
<body style="background-color: #F1F4F7">
<div class="main">
    <div class="main_one">
        <div class="left">
            <ul style="list-style-type:none;">
                <li style="background-color: #30A4FF;color: white" onclick="module(1)">
                    <i class="layui-icon layui-icon-fire"></i> 试卷列表
                </li>
                <li onclick="module(2)">
                    <i class="layui-icon layui-icon-survey" ></i> 添加试卷
                </li>
            </ul>
        </div>
<div id="app" class="container right">
    <div class="myExam">
    <form  class="form-inline bg-info" role="form" style="background-color: #EDEAEA;">
        查询条件:
        <div class="form-group">
            <label class="sr-only" for="paper_name">试卷名称:</label>
            <input type="text"class="form-control" id="paper_name" placeholder="试卷名称">
        </div>
        <div class="form-group">
            <label class="sr-only" for="teacher_name">教师名称:</label>
            <input type="text"class="form-control" id="teacher_name" placeholder="教师名称">
        </div>
        <button type="button" class="btn btn-success" id="findUser" style="background-color: #30A4FF;border-color: #30A4FF">查询试卷</button>
        <button type="button" class="btn btn-success" id="addUser" style="background-color: #30A4FF ;border-color: #30A4FF">添加试卷</button>
    </form>
    <div class="table-responsive">
        <table class="table" id="tab">
            <thead>
            <tr class="success" style="background: #E8B8B8">
                <td>序号</td>
                <td>试卷名称</td>
                <td>创建时间</td>
                <td>试卷类型</td>
                <td>所属老师</td>
                <td>及格分数</td>
                <td>满分</td>
                <td>时长</td>
                <td>班级</td>
                <td>密令</td>
                <td>上线状态</td>
                <td>操作</td>
            </tr>
            </thead>
            <tr class="active" v-for="(item,index) in result">
                <td>{{index+1}}</td>
                <td><a href="#" @click="showPaper(item.paper_id)">{{item.paper_name}}</a></td>
                <td>{{item.creat_time}}</td>
                <td>{{item.ptype.ptype_name}}</td>
                <td>{{item.teacher.teacher_name}}</td>
                <td>{{item.pass}}</td>
                <td>{{item.full}}</td>
                <td>{{item.dura}}</td>
                <td>{{item.aClass.class_name}}</td>
                <td>{{item.p_key}}</td>
                <td v-if="item.online_state==1">已上线</td>
                <td v-if="item.online_state==0">未上线</td>
                <td><a href="#" @click="editEvent(item.paper_id)">编辑</a>
                    <a href="#" @click="delEvent(item.paper_id)">删除</a>
                    <a v-if="item.online_state==1"  href="#" @click="upLine(item.paper_id,item.online_state)">下线</a>
                    <a v-if="item.online_state==0"  href="#" @click="upLine(item.paper_id,item.online_state)">上线</a>
                </td>
            </tr>
        </table>
        <div id="pagenav"></div>
    </div>
</div>
    <div class="sim">
        <form>
            <div>
                试卷名称：
                <input type="text" id="paper_name" name="paper_name">
            </div>
            <div>
                组卷方式：
                <select name="a_type" id="a_type">
                    <option value=1>自动组卷</option>
                    <option value=2>手动组卷</option>
                </select>
            </div>
            <div>
                试卷类型:
                <select name="ptype_id" id="ptype_id">
                    <option>--请选择--</option>
                <#list ptypeList as ptype>
                    <option value="${ptype.ptype_id}">${ptype.ptype_name}</option>
                </#list>
                </select>
            </div>
            <div>
                时长：
                <input type="text" id="dura" name="dura">(分钟)
            </div>
            <div id="z_type">
                <div id="t_fen">
                    题型分布：
                    <div id="t_type">
                    <#list typeList as type>
                        <div id="${type.type_id}" class="tt_type">
                            <input type="hidden" class="type_name" value="${type.type_name}">${type.type_name}:
                            <input type="text" class="dao" onchange="changeDao($(this).parent().attr('id'),$(this).val(),$(this).siblings().last())">
                            道
                            每道题：
                            <input type="text" class="fen">分<span class="daos" style="color: red" id="${type.type_name}"></span>
                        </div>
                    </#list>
                    </div>

                </div>
                <div>
                    总分：
                    <input type="text" id="full" name="full" readonly="true">
                </div>
                <div>
                    及格分数：
                    <input type="text" id="pass" name="pass">
                </div>

                <div id="t_fan">
                    知识点范围：<br>
                    选择题库：
                    <div>
                    <#--//题库-->
                        <select name="lib" id="lib" size="6" style="width: 50%">
                        <#list libList as lib>
                            <option value="${lib.lib_id}">${lib.lib_name}</option>
                        </#list>
                        </select>
                    </div>
                    选择知识点：
                    <div>
                    <#--//知识点-->
                        <select name="point" id="point" size="6" style="width: 50%">

                        </select>
                    </div>
                    <div>
                        <input type="button" id="addPoint" name="addPoint" value="添加知识点">
                        <input type="button" id="delePoint" name="delePoint" value="删除知识点">
                        <input type="button" id="clarePoint" name="clarePoint" value="清空知识点">
                    </div>
                    所选知识点：
                    <div>
                    <#--//所选知识点-->
                        <select id="cpoint" name="cpoint" size="6" style="width: 50%">

                        </select>
                    </div>
                </div>
            </div>
            <div>
            <#--班级列表-->
                班级：
                <select id="class_id" name="class_id">
                    <option>--请选择--</option>
                <#list classList as class>
                    <option value="${class.class_id}">${class.class_name}</option>
                </#list>
                </select>
            </div>
            <div>
                <input type="button" id="c_pwd" name="c_pwd" value="生成密令">
                <input type="text" id="pwd" name="pwd">
            </div>
            <div>
                <button type="button" id="saveBtn" class="btn btn-success">生成试卷</button>
            </div>
        </form>
    </div>
</div>
</div>
    </div>
<script src="/js/paper/paper_list.js"></script>
<script src="/js/paper/paper_add.js"></script>
</body>
</html>